Dropdown

fun <T : Any> Dropdown(modifier: Modifier = Modifier, isOpen: Boolean, menu: MenuItem<T>, colors: DropDownMenuColors = dropDownMenuColors(), offset: DpOffset = DpOffset.Zero, enter: EnterAnimation = EnterAnimation.FadeIn, exit: ExitAnimation = ExitAnimation.FadeOut, easing: Easing = Easing.FastOutLinearInEasing, enterDuration: Int = 500, exitDuration: Int = 500, onItemSelected: (T?) -> Unit, onDismiss: () -> Unit)

Dropdown is a DropdownMenu wrapper class to add cascade effect and animations.

Parameters

modifier

The modifier for the Dropdown.

isOpen

Represents whether the dropdown is open.

menu

Represents the menu items to be displayed in the dropdown.

colors

Specifies the colors for the dropdown menu.

offset

Defines the offset of the dropdown from its default position.

enter

The enter animation for the dropdown content.

exit

The exit animation for the dropdown content.

easing

The easing function for the animation.

enterDuration

The duration for the enter animation.

exitDuration

The duration for the exit animation.

onItemSelected

Callback triggered when an item is selected in the dropdown.

onDismiss

Callback executed when the dropdown is dismissed or closed.